package com.fhz.day004.test

/**
 * 时间:2021/10/16
 * @author msfeng
 * 简述: TODO
 */
fun main(){
    //数组
    val arrayOf = arrayOf("1", "2", "3")
    arrayOf[0] = "11"
    var a = arrayOf[1]

    arrayOf.forEach {
        println(it)
    }


    var a1 = "1"

//    var b = when(a1){
//        "1" -> 1
//        "2" -> 2
//        else -> 0
//    }

}

fun get(res:Response) = when(res){
    is Success -> println(1)
    is Fail -> println(2)
}
